This file contains hidden or 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
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module Object where | |
| import qualified Csg | |
| import Data.List | |
| import Data.Serialize | |
| import Data.Semigroup | |
| import Data.Vec3 as V3 |
This file contains hidden or 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
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module Object where | |
| import qualified Csg | |
| import Data.List | |
| import Data.Serialize | |
| import Data.Semigroup | |
| import Data.Vec3 as V3 |
This file contains hidden or 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
| import Data.List (minimumBy) | |
| import Data.Function (on) | |
| nearestInc :: Int -> [Int] -> Int | |
| nearestInc n xs = | |
| case span (<n) xs of | |
| ([], h:_) -> h | |
| (ss, []) -> last ss | |
| (ss, l:_) -> minimumBy (compare `on` abs . (`subtract` n)) [last ss, l] |
This file contains hidden or 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
| { | |
| "problemMatcher": [ | |
| { | |
| "owner": "hlint", | |
| "severity": "warning", | |
| "pattern": [ | |
| { | |
| "regexp": "^([^:]*\\/)([^:/]*):(\\d+)(-\\d+)?:(\\d+)(-\\d+)?: (Warning|Error): (.*)$", | |
| "fromPath": 1, | |
| "file": 2, |
This file contains hidden or 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
| {-# LANGUAGE TypeSynonymInstances #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module Object where | |
| import qualified Csg | |
| import qualified Csg.STL | |
| import Data.List | |
| import Data.Serialize | |
| import Data.Semigroup | |
| import Data.Vec3 as V3 |
This file contains hidden or 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
| mkdir junk | |
| for file in $(git ls-files --others --exclude-standard); do mv "$file" junk; done |
This file contains hidden or 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
| module Object where | |
| import qualified Csg | |
| import qualified Csg.STL | |
| import Data.List | |
| import Data.Serialize | |
| import Data.Semigroup | |
| import Data.Vec3 as V3 | |
| import qualified Data.Text.IO as T |
This file contains hidden or 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
| {-# Language FlexibleInstances #-} | |
| module SillyVersion where | |
| import Data.Ratio | |
| data SillyVersion = SillyVersion Integer Integer Integer | |
| display :: (() -> SillyVersion) -> String | |
| display f = let SillyVersion maj min pat = f () | |
| in show maj <> "." <> show min <> "." <> show pat |
This file contains hidden or 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
| #!/usr/bin/env stack | |
| {- stack script --resolver lts-21.13 | |
| --package linear | |
| --package lens | |
| --package waterfall-cad | |
| --extra-dep waterfall-cad-0.1.1.1 | |
| --extra-dep opencascade-hs-0.1.1.1 | |
| -} | |
| import qualified Waterfall | |
| import qualified Waterfall.TwoD.Shape as Shape |
OlderNewer