This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A program to take line segments in and find intersections fast | |
-- Challenge from: http://thirdpartyninjas.com/blog/2008/10/07/line-segment-intersection/ | |
-- Intersection algorithm from: http://stackoverflow.com/a/565282/786339 | |
import Data.Maybe -- To make Maybe handling easier | |
import Data.List -- So we can sort | |
import System.IO -- For file loading | |
------------------ Some types we'll use ------------------ |