Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 1.01 KB
-- Copyright (c) 2007-2008 by Leif Frenzel <>
-- All rights reserved.
-- This is just a bridge to the code that does the real work, which was taken
-- from
-- and is (c) by Thomas Jaeger. See the file LICENSE for license info.
module MakePointFree where
-- We must import Cohatoe.API and implement resource so that this code
-- can be dynamically loaded as plugin.
import Cohatoe.API
import Plugin.Pl.Common
import Plugin.Pl.Op
import Plugin.Pl.Parser
import Plugin.Pl.Transform
resource :: Interface
resource = plugin {
pluginMain = performMakePointFree
performMakePointFree :: [String] -> IO [String]
performMakePointFree [arg] = return [makePointFree arg]
performMakePointFree _ = error "Bogus selection"
makePointFree :: String -> String
makePointFree input = case parsePF input of
Right d -> show $ last $ mapTopLevel' optimize $ mapTopLevel transform d
Left msg -> error msg
Jump to Line
Something went wrong with that request. Please try again.